#include <stdio.h>
#include<math.h>
#define D 365
double birthProb (double n);
int main(void) {
   double n;
   printf("Enter n  : ");
   scanf("%lf",&n);
   double y= birthProb   (n);
   printf("the result is %f",y);
    return 0 ;
}

double birthProb   (double n)
{ 

  
  double b=(D-1)/D;
  double p=(n*(n-1)/2);
  double a=1-pow(b,p);
    return a;
}
